1. Field of the Invention
The invention relates to a memory storage device, and more particularly, relates to an encoding method and a memory storage apparatus using the encoding method.
2. Description of Related Art
Generally, data to be written to a rewritable non-volatile memory (NVM) may be encoded into a codeword according to an error correcting codes (ECC). The codeword read from the rewritable non-volatile memory may also be processed by a corresponding decoding procedure to restore to the data. The codeword, is usually a combination of the data itself and a parity data generated according to the Bose-Chaudhuri-Hocquenghem (BCH) code, the hamming code, the hamming code with additional parity (SECDED), the Reed-Solomon code, or the Hsiao code, etc.
For improving the reliability or the endurance of an NVM, a test engineer has to repeatedly cycle each memory cell of the NVM, such as to write an all-one and an all-zero pattern cyclically to every cells. In light of the foregoing, it is necessary to provide a mechanism for conveniently carrying out such testing procedure on an NVM adopting an ECC scheme.